Ext.onReady(function ()
{
	//定义数据类型
	//环境模型
	Ext.define("EnvironmentModel",
	{
		extend : "Ext.data.Model",
		fields : [
			{
				name : "environment_id",
				type : "int"
			},
			{
				name : "name",
				type : "string"
			},
			{
				name : "information",
				type : "string"
			}
		]
	}
	);
	//教师模型
	Ext.define("UserModel",
	{
		extend : "Ext.data.Model",
		fields : [
			{
				name : "user_id",
				type : "int"
			},
			{
				name : "PID",
				type : "string"
			},
			{
				name : "name",
				type : "string"
			},
			{
				name : "account",
				type : "string"
			},
			{
				name : "role_id",
				type : "int"
			},
			{
				name : "role",
				type : "string"
			},
			{
				name : "log_time",
				type : "string"
			}
		]
	}
	);
	//学期模型
	Ext.define("TermModel",
	{
		extend : "Ext.data.Model",
		fields : [
			{
				name : "term_id",
				type : "int"
			},
			{
				name : "name",
				type : "string"
			},
			{
				name : "start_date",
				type : "string"
			},
			{
				name : "start_week",
				type : "int"
			},
			{
				name : "total_weeks",
				type : "int"
			},
			{
				name : "status",
				type : "int"
			}
		]
	}
	);
	//角色模型
	Ext.define("RoleModel",
	{
		extend : "Ext.data.Model",
		fields : [
			{
				name : "role_id",
				type : "int"
			},
			{
				name : "priv",
				type : "int"
			},
			{
				name : "status",
				type : "int"
			},
			{
				name : "name",
				type : "string"
			}
		]
	}
	);
	//模块模型
	Ext.define("ModuleModel",
	{
		extend : "Ext.data.Model",
		fields : [
			{
				name : "module_id",
				type : "int"
			},
			{
				name : "name",
				type : "string"
			},
			{
				name : "description",
				type : "string"
			}
		]
	}
	);
	//周次模型
	Ext.define("WeekModel",
	{
		extend : "Ext.data.Model",
		fields : [
			{
				name : "week_id",
				type : "int"
			},
			{
				name : "start_date",
				type : "string"
			},
			{
				name : "week_describe",
				type : "string"
			},
			{
				name : "holiday_id",
				type : "int"
			},
			{
				name : "res",
				type : "string"
			}
		]
	}
	);
	//节次模型
	Ext.define("PeriodModel",
	{
		extend : "Ext.data.Model",
		fields : [
			{
				name : "period_id",
				type : "int"
			},
			{
				name : "period_info",
				type : "string"
			},
			{
				name : "start_time",
				type : "string"
			},
			{
				name : "end_time",
				type : "string"
			}
		]
	}
	);
	//课程模型
	Ext.define("CourseModel",
	{
		extend : "Ext.data.Model",
		fields : [
			{
				name : "course_id",
				type : "int"
			},
			{
				name : "name",
				type : "string"
			},
			{
				name : "code",
				type : "string"
			},
			{
				name : "comment",
				type : "string"
			},
			{
				name : "type",
				type : "int"
			}
		]
	}
	);
	//实验室模型
	Ext.define("RoomModel",
	{
		extend : "Ext.data.Model",
		fields : [
			{
				name : "room_id",
				type : "int"
			},
			{
				name : "name",
				type : "string"
			},
			{
				name : "admin_name",
				type : "string"
			},
			{
				name : "description",
				type : "string"
			},
			{
				name : "num_of_computer",
				type : "int"
			}
		]
	}
	);
	//假期模型
	Ext.define("HolidayModel",
	{
		extend : "Ext.data.Model",
		fields : [
			{
				name : "holiday_id",
				type : "int"
			},
			{
				name : "name",
				type : "string"
			},
			{
				name : "start_date",
				type : "string"
			},
			{
				name : "end_date",
				type : "string"
			}
		]
	}
	);
}
);
